<?php
namespace pinduoduo\Request;

use pinduoduo\AbstractInterface\Request;

class PddDdkGoodsRecommendGetRequest extends Request
{
    /**
     * 多多进宝商品推荐API
     * @var string
     */
    private $type = 'pdd.ddk.goods.recommend.get';

    /**
     * 活动商品标记数组，例：[4,7]，4-秒杀，7-百亿补贴，10851-千万补贴，11879-千万神券，10913-招商礼金商品，31-品牌黑标，10564-精选爆品-官方直推爆款，10584-精选爆品-团长推荐，24-品牌高佣，其他的值请忽略
     * @var
     */
    private $activityTags;

    /**
     * 猜你喜欢场景的商品类目，商品类目ID，使用pdd.goods.cats.get接口获取
     * @var
     */
    private $catId;

    /**
     * 进宝频道推广商品: 1-今日销量榜,3-相似商品推荐,4-猜你喜欢(和进宝网站精选一致),5-实时热销榜,6-实时收益榜。默认值5
     * @var
     */
    private $channelType;

    /**
     * 自定义参数，为链接打上自定义标签；自定义参数最长限制64个字节；格式为： {"uid":"11111","sid":"22222"} ，其中 uid 为用户唯一标识，可自行加密后传入，每个用户仅且对应一个标识，必填； sid 为上下文信息标识，例如sessionId等，非必填。该json字符串中也可以加入其他自定义的key。
     * @var
     */
    private $customParameters;

    /**
     * 商品主图类型：1-场景图，2-白底图，默认为0
     * @var
     */
    private $goodsImgType;

    /**
     * 相似商品推荐场景时必传。goodsSign，请求相似商品时，仅取数组的第一位
     * @var
     */
    private $goodsSignList;

    /**
     * 一页请求数量；默认值 ： 20
     * @var
     */
    private $limit;

    /**
     * 翻页时建议填写前页返回的list_id值
     * @var
     */
    private $listId;

    /**
     * 从多少位置开始请求；默认值 ： 0，offset需是limit的整数倍，仅支持整页翻页
     * @var
     */
    private $offset;

    /**
     * 推广位id
     * @var
     */
    private $pid;

    public function setType($type)
    {
        $this->type = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    public function setActivityTags($activityTags)
    {
        $this->activityTags = $activityTags;
    }

    public function getActivityTags()
    {
        return $this->activityTags;
    }

    public function setCatId($catId)
    {
        $this->catId = $catId;
    }

    public function getCatId()
    {
        return $this->catId;
    }

    public function setChannelType($channelType)
    {
        $this->channelType = $channelType;
    }

    public function getChannelType()
    {
        return $this->channelType;
    }

    public function setCustomParameters($customParameters)
    {
        $this->customParameters = $customParameters;
    }

    public function getCustomParameters()
    {
        return $this->customParameters;
    }

    public function setGoodsImgType($goodsImgType)
    {
        $this->goodsImgType = $goodsImgType;
    }

    public function getGoodsImgType()
    {
        return $this->goodsImgType;
    }

    public function setGoodsSignList($goodsSignList)
    {
        $this->goodsSignList = $goodsSignList;
    }

    public function getGoodsSignList()
    {
        return $this->goodsSignList;
    }

    public function setLimit($limit)
    {
        $this->limit = $limit;
    }

    public function getLimit()
    {
        return $this->limit;
    }

    public function setListId($listId)
    {
        $this->listId = $listId;
    }

    public function getListId()
    {
        return $this->listId;
    }

    public function setOffset($offset)
    {
        $this->offset = $offset;
    }

    public function getOffset()
    {
        return $this->offset;
    }

    public function setPid($pid)
    {
        $this->pid = $pid;
    }

    public function getPid()
    {
        return $this->pid;
    }

    public function getParams()
    {
        $params = [
            'type'              => $this->type,
            'activity_tags'     => $this->activityTags,
            'cat_id'            => $this->catId,
            'channel_type'      => intval($this->channelType),
            'custom_parameters' => $this->customParameters,
            'goods_img_type'    => $this->goodsImgType,
            'goods_sign_list'   => $this->goodsSignList,
            'limit'             => $this->limit,
            'list_id'           => $this->listId,
            'offset'            => $this->offset,
            'pid'               => $this->pid,
        ];
        return array_filter($params);
    }
}
